Skip to content

Fix GH-13264: fgets() and stream_get_line() do not return false on filter fatal error #18778

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

bukka
Copy link
Member

@bukka bukka commented Jun 5, 2025

This happens because there are no checks in php_stream_fill_read_buffer calls. This should not fail always but only on fatal error so special flag is needed for that.

… filter fatal error

This happens because there are no checks in php_stream_fill_read_buffer
calls. This should not fail always but only on fatal error so special
flag is needed for that.

Closes phpGH-18778
@bukka bukka force-pushed the stream_gh13264_filter_fatal_err branch from ae4ee72 to b85429e Compare June 5, 2025 17:50
@bukka bukka changed the title Fix GH-81475: fgets() and stream_get_line() do not return false on filter fatal error Fix GH-13264: fgets() and stream_get_line() do not return false on filter fatal error Jun 5, 2025
Copy link
Member

@nielsdos nielsdos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is right. I also double checked no assignments to eof = 0; were missed

@bukka bukka closed this in a36b8fd Jun 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fgets() does not return false on error from a zlib.inflate filtered stream with large content and invalid checksum
3 participants